package com.yiren.dbaa.module.practice_set.line.contract;

import android.app.Activity;

import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.TextureMapView;
import com.yiren.backstage.currency.bean.LinePointBean;

import java.util.List;

/**
 * Describe
 *
 * @author WRX
 * @date 2022/11/21
 */
public interface BaiduMapContract {

    interface Model {

        /**
         * 根据TextureMapView获取百度地图
         *
         * @param mMapView
         * @return
         */
        BaiduMap getBaiduMap(TextureMapView mMapView);

        /**
         * 根据MapView获取百度地图
         *
         * @param mMapView
         * @return
         */
        BaiduMap getBaiduMap(MapView mMapView);

        /**
         * 更新定位位置
         *
         * @param mBaiduMap
         * @param bearing
         * @param latitude
         * @param longitude
         */
        void updateLocationInfo(BaiduMap mBaiduMap, float bearing, double latitude, double longitude);

        /**
         * 绘制百度地图标识物
         *
         * @param pointList
         * @param mBaiduMap
         * @param currentPointIndex
         */
        void drawBaiduMarker(Activity mActivity, List<LinePointBean> pointList, BaiduMap mBaiduMap, int currentPointIndex);
    }

    interface View {
    }

    interface Presenter {

        /**
         * 加载百度地图
         *
         * @param mapView
         * @return
         */
        BaiduMap LoadBaiduMap(MapView mapView, boolean isPositioning);

        /**
         * 百度地图位置更新监听
         */
        void baiduMapGpsListener();

        /**
         * 绘制百度地图标识物
         *
         * @param pointList
         * @param mBaiduMap
         * @param currentPointIndex
         */
        void drawBaiduMarker(List<LinePointBean> pointList, BaiduMap mBaiduMap, int currentPointIndex);

        /**
         * 停止更新位置
         */
        void stopRefreshOption(boolean isRefreshOption);

    }
}
